from typing import List
from pydantic import BaseModel

# 定义查询请求模型
class QueryRequest(BaseModel):
    query: str
    top_k: int = 5
    rerank: bool = True
    category: str 

# 定义文本嵌入请求模型
class TextEmbeddingRequest(BaseModel):
    text: str
    metadata: dict = {}

# 定义图片嵌入请求模型
class ImageEmbeddingRequest(BaseModel):
    image_url: str
    metadata: dict = {}

# 定义解析 Web URL 请求模型
class ParseWebURLRequest(BaseModel):
    url: str
    metadata: dict = {}

# 定义批量解析 Web URL 请求模型
class ParseWebURLBatchRequest(BaseModel):
    urls: List[str]
    metadata: dict = {}

# 定义删除分类请求模型
class DeleteCategoryRequest(BaseModel):
    category_name: str

# 定义删除分类请求模型
class AddCategoryRequest(BaseModel):
    name: str
    desc: str